load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "migration-create-admitter.go",
        "migration-update-admitter.go",
        "migrationpolicy-admitter.go",
        "pod-eviction-admitter.go",
        "status-admitter.go",
        "validate-k8s-utils.go",
        "vmclone-admitter.go",
        "vmi-create-admitter.go",
        "vmi-preset-admitter.go",
        "vmi-update-admitter.go",
        "vmirs-admitter.go",
        "vmpool-admitter.go",
        "vms-admitter.go",
    ],
    importpath = "kubevirt.io/kubevirt/pkg/virt-api/webhooks/validating-webhook/admitters",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/apimachinery/patch:go_default_library",
        "//pkg/controller:go_default_library",
        "//pkg/defaults:go_default_library",
        "//pkg/downwardmetrics:go_default_library",
        "//pkg/dra/admitter:go_default_library",
        "//pkg/hooks:go_default_library",
        "//pkg/instancetype/conflict:go_default_library",
        "//pkg/instancetype/webhooks/vm:go_default_library",
        "//pkg/liveupdate/memory:go_default_library",
        "//pkg/monitoring/metrics/virt-api:go_default_library",
        "//pkg/network/admitter:go_default_library",
        "//pkg/network/link:go_default_library",
        "//pkg/network/vmispec:go_default_library",
        "//pkg/storage/admitters:go_default_library",
        "//pkg/storage/reservation:go_default_library",
        "//pkg/storage/types:go_default_library",
        "//pkg/util/hardware:go_default_library",
        "//pkg/util/migrations:go_default_library",
        "//pkg/util/webhooks:go_default_library",
        "//pkg/util/webhooks/validating-webhooks:go_default_library",
        "//pkg/virt-api/webhooks:go_default_library",
        "//pkg/virt-config:go_default_library",
        "//pkg/virt-config/featuregate:go_default_library",
        "//pkg/virt-operator/resource/generate/components:go_default_library",
        "//staging/src/kubevirt.io/api/clone:go_default_library",
        "//staging/src/kubevirt.io/api/clone/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/instancetype/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/migrations:go_default_library",
        "//staging/src/kubevirt.io/api/migrations/v1alpha1:go_default_library",
        "//staging/src/kubevirt.io/api/pool/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubevirt:go_default_library",
        "//vendor/k8s.io/api/admission/v1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/api/policy/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/validation:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
        "//vendor/k8s.io/client-go/kubernetes:go_default_library",
        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "admitters_suite_test.go",
        "migration-create-admitter_test.go",
        "migration-update-admitter_test.go",
        "migrationpolicy-admitter_test.go",
        "pod-eviction-admitter_test.go",
        "vmclone-admitter_test.go",
        "vmi-create-admitter_test.go",
        "vmi-preset-admitter_test.go",
        "vmi-update-admitter_test.go",
        "vmirs-admitter_test.go",
        "vmpool-admitter_test.go",
        "vms-admitter_test.go",
    ],
    embed = [":go_default_library"],
    race = "on",
    deps = [
        "//pkg/apimachinery/patch:go_default_library",
        "//pkg/hooks:go_default_library",
        "//pkg/instancetype/webhooks/vm:go_default_library",
        "//pkg/libvmi:go_default_library",
        "//pkg/libvmi/cloudinit:go_default_library",
        "//pkg/liveupdate/memory:go_default_library",
        "//pkg/pointer:go_default_library",
        "//pkg/testutils:go_default_library",
        "//pkg/virt-api/webhooks:go_default_library",
        "//pkg/virt-config:go_default_library",
        "//pkg/virt-config/featuregate:go_default_library",
        "//pkg/virt-handler/node-labeller/util:go_default_library",
        "//pkg/virt-operator/resource/generate/components:go_default_library",
        "//staging/src/kubevirt.io/api/clone:go_default_library",
        "//staging/src/kubevirt.io/api/clone/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/core:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/instancetype/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/migrations:go_default_library",
        "//staging/src/kubevirt.io/api/migrations/v1alpha1:go_default_library",
        "//staging/src/kubevirt.io/api/pool/v1alpha1:go_default_library",
        "//staging/src/kubevirt.io/api/snapshot/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/client-go/api:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubevirt/fake:go_default_library",
        "//staging/src/kubevirt.io/client-go/testutils:go_default_library",
        "//vendor/github.com/onsi/ginkgo/v2:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/github.com/onsi/gomega/gstruct:go_default_library",
        "//vendor/github.com/onsi/gomega/types:go_default_library",
        "//vendor/go.uber.org/mock/gomock:go_default_library",
        "//vendor/k8s.io/api/admission/v1:go_default_library",
        "//vendor/k8s.io/api/authentication/v1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/api/policy/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
        "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library",
        "//vendor/k8s.io/client-go/testing:go_default_library",
        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
        "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library",
    ],
)
